package com.superfeng.cloud.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.superfeng.cloud.entity.Dept;
import com.superfeng.cloud.mapper.DeptMapper;
import com.superfeng.cloud.service.DeptService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements DeptService{
    @Override
    public Dept getDeptId(Long deptNo) {
        return this.getOne(Wrappers.<Dept>query().lambda().eq(Dept::getDeptNo, deptNo));
    }

    @Override
    public List<Dept> getList() {
        return this.list(Wrappers.<Dept>query());
    }
}
